package com.service;

import java.util.List;

import com.dao.GoalDao;
import com.dao.TaskDao;
import com.entity.Goal;
import com.entity.Task;
import com.util.GoalStateHelp;

public class GoalService {

	private GoalDao dao=new GoalDao();
	private TaskDao dao2=new TaskDao();
	public List<Goal> findGoalAll(String projectid){
		
		return dao.findByProjectId(projectid);
	}
	
	public List<Task> findTaskAll(String goalid){
		return dao2.findTaskByGoalId(goalid);
	}
	
	public Goal findById(String goalId) {
		return dao.findById(goalId);
	}
	public  void add(Goal goal){
		 dao.save(goal);
	}
	public void update(Goal goal) {
		// TODO Auto-generated method stub
		dao.update(goal);
	}
	
}
